Digital devices become common, from very small devices such as smart cards to multimedia players, mobile phones and so on. These digital devices usually have limited available memory. On the other hand, these devices are expected to perform a growing amount of tasks as well as to be able to dynamically load new tasks.
One such example of these digital devices is a mobile phone executing games written in the Java programming language (java.sun.com). These mobile phones have a Java virtual machine installed and the phone is capable of downloading Java programs dynamically from the network. The Java programming language for devices is a special environment referred to as J2ME or Java Micro Edition. This environment is specifically tailored for mobile phones and other devices with limited amounts of memory. These amounts usually refer a minimum of 64K bytes to 128 Kbytes and more.
There are devices that have significantly less memory available than these type of devices. Devices such as smart cards and flash based memory devices such as memory cards and flash drives usually have much smaller amounts of dynamic memory available.
In such devices with insufficient RAM memory, virtual memory can be used to simulate a larger RAM capacity, through the use of secondary memory, for example magnetic media such as hard drive or flash media.
To handle virtual memory a processor capable of handling virtual memory is required, but on low-end processors in small, embedded devices this ability may not be available. In some cases, even if processors do have virtual memory capabilities, it may not be desirable to use them because other parts of the embedded device may be using the virtual memory capabilities, making it too difficult to manage virtual memory for Java on the embedded device.
Some devices have very limited RAM constraints. An environment made for such devices is the Java Card Technology http://java.sun.com/products/javacard/ that is much more limited than J2ME. This environment does not allow many of the features of J2ME and is very limited to small, dedicated applications.
Having a J2ME environment on limited devices may allow making use of these platforms for numerous dynamic applications, such as security applications, unalterable code, code hiding, algorithm hiding, DRM applications etc. Furthermore it can open device for external developers that can develop these applications. Such applications may be downloaded upon request.
There is thus a need for executing a J2ME environment on these limited devices, though the memory requirement of J2ME prevents using this environment on these devices.
There are hardware devices which make use of a CPU that includes internal RAM within the CPU. In addition to the CPU the hardware device may include external RAM outside of the CPU and/or non-volatile memory. Such a device along with a secure virtual memory mechanism of this invention may be utilized when there is a need to keep certain code running only within internal RAM of CPU. This requirement arises for several reasons, some of which are program protection from alteration and program copy protection. In cases where more memory is required than available RAM within CPU, external RAM and/or external non-volatile memory may be used only if data transferred to them is encrypted.
In some cases it is required that programs and files be sent securely to a hardware device and execute on that device in a manner as described where CPU makes use only of internal RAM.
There is thus a widely recognized need for running programs using a small amount of RAM and using additional external auxiliary memory, in environments such as J2ME.